import { request } from "../utils/request";

export function apiGetBanner(){
	let config = {
		url:"/api/user/lun"
	}
	
	return request(config);
}



export function apiGetNotice(){
	let config = {
		url:"/wallNewsList"
	}
	return request(config);
}

export function apiGetClassfy(){
	let config = {
		 url:"/classify",
		 data:{
			select:true,
		}
	}
	return request(config);
}

export function apiGetClassList(data={}){
	let config = {
		 url:"/wallList",
		 data
	}
	return request(config);
}

export function apiSetScore(data={}){
	let config = {
		 url:"/setupScore",
		 data
	}
	return request(config);
}

//登录注册
export function apiLogin(data={}){
	
	let config = {
		 url:"/api/user/login",
		 data,
		 method:'POST'
	}
	return request(config);
}

//查询用户基本信息
export function apiUserInfo(data={}){
	let config = {
		 url:"/api/index/index",
		 data,
		 method:'POST'
	}
	return request(config);
}

//获取商品分类
export function apiGetCategory(data={}){
	let config = {
		 url:"/api/mall/category",
		 data,
		 method:'POST'
	}
	return request(config);
}

//获取商品分类中的商品
export function apiGetShopData(data={}){
	let config = {
		 url:"/api/mall/shops",
		 data,
		 method:'POST'
	}
	return request(config);
}

//微信登录
export function apiLoginByCode(data={}){
	let config = {
		 url:"/api/login/loginWxTrue",
		 data,
		 method:'POST'
	}
	return request(config);
}


//高德逆解析接口
export function apiGetLocation(data={}){
	let config = {
		 url:"https://restapi.amap.com/v3/geocode/regeo",
		 data,
		 method:'GET'
	}
	return request(config);
}